package com.yh.csx.event.rpc.resource;

import com.yh.csx.business.api.entity.CommonResponse;
import com.yh.csx.event.rpc.order.OrderService;
import com.yh.csx.event.store.event.dto.req.EventReq;
import com.yh.csx.event.store.event.dto.resp.EventResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhangsheng
 * @date 2021/8/27 18:28
 */
@RestController
@RequestMapping("order")
public class OrderResource {
    @Autowired
    private OrderService orderService;

    @GetMapping("publish")
    public CommonResponse<Boolean> queryEvents(@RequestParam(value = "num", defaultValue = "10", required = false) int num) {
        return CommonResponse.success(orderService.publishOrder(num));
    }
}
